package com.learn.simplefactory;

public class Test {

    public static void main(String[] args) {
//        IPet pet = new Cat();
//        pet.cry();

//        IPet pet = PetFactory.create("dog");
//        pet.cry();

//        IPet pet = PetFactory.create("com.learn.simplefactory.Dog");
//        pet.cry();

//        IPet pet = PetFactory.create(Dog.class);
//        pet.cry();

        Dog dog = PetFactory.create(Dog.class);
        dog.cry();
    }
}
